import {useState} from 'react';
import {createModel} from 'hox';
import {PcapResult} from "../entity/Summary";

export const DefaultD3MenuRightWidth = 380;

// d3-人员右侧面板 状态管理
const UseGlobalStore = () => {
  const [pcapResult, setPcapResult] = useState<PcapResult | undefined>(undefined);
  const [downloadStream, setDownloadStream] = useState<string | undefined>(undefined);
  const [loading, setLoading] = useState(false);

  return {
    pcapResult, setPcapResult,
    loading, setLoading,
    downloadStream, setDownloadStream
  };
};
export default createModel(UseGlobalStore);
